<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%
	Date now = new Date();
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	String tipTime = sdf.format(now);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>信息实时监控</title>
<script type="text/javascript" src="../resource/js/jquery-1.4.2.js"></script>
<style type="text/css">
	body,html,td,input,select,span,a,div,option,legend {
		font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
		color: black;
		font-size: 13px;
	}

	fieldset {
		border: 1px #04CA3A dashed;
		cursor:pointer;
		width: 800px;
		padding-left: 10px;
		padding-right: 10px;
		padding-bottom: 10px;
		background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#ECECEC));
		background: -moz-linear-gradient(top, #FFFFFF, #ECECEC);
		filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#ECECEC',GradientType=0);
	}
	.legend_bg1{
		background: -webkit-gradient(linear, left top, right bottom, from(#E15241), to(#FFFFFF));
		background: -moz-linear-gradient(left, #E15241, #FFFFFF);
		filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#E15241', endColorstr='#FFFFFF',GradientType=1);
	}
	.legend_bg2{
		background: -webkit-gradient(linear, left top, right bottom, from(#31BAEF), to(#FFFFFF));
		background: -moz-linear-gradient(left, #31BAEF, #FFFFFF);
		filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#31BAEF', endColorstr='#FFFFFF',GradientType=1);
	}
	.legend_bg3{
		background: -webkit-gradient(linear, left top, right bottom, from(#EFBA21), to(#FFFFFF));
		background: -moz-linear-gradient(left, #EFBA21, #FFFFFF);
		filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EFBA21', endColorstr='#FFFFFF',GradientType=1);
	}
	.legend_bg4{
		background: -webkit-gradient(linear, left top, right bottom, from(#5AD329), to(#FFFFFF));
		background: -moz-linear-gradient(left, #5AD329, #FFFFFF);
		filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5AD329', endColorstr='#FFFFFF',GradientType=1);
	}
	.legend_bg5{
		background: -webkit-gradient(linear, left top, right bottom, from(#FF71C6), to(#FFFFFF));
		background: -moz-linear-gradient(left, #FF71C6, #FFFFFF);
		filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF71C6', endColorstr='#FFFFFF',GradientType=1);
	}
	legend {
		border: 1px #04D03B dashed;
		padding: 1px 3px 1px 3px;
		font-size:18px;
		font-weight:600;
		font-family: '隶书';
		color: #383E5E;
	}
	fieldset table{
		border-top: 1px solid #5ADB31;
	}
	fieldset table td {
		border-bottom: 1px solid #5ADB31;
		border-right: 1px solid #5ADB31;
		text-align: center;
		height: 25px;
	}
</style>
</head>
<body>
<div style="color: red;">提示：双击监控模块即可进入相应模块进行操作。</div>
<br/>
<fieldset id="yz" style="width: 740px" uri="member/memberlist.jsp">
	<legend class="legend_bg1">业主注册监控</legend>
	<table cellpadding="0" cellspacing="0" width="740px" style="margin-top: 15px;">
	<tr>
		<td width="80px">会员名</td><td width="80px">真实姓名</td><td width="80px">联系电话</td><td width="300px">地址</td><td style="border-right: 0px;">申请时间</td>
	</tr>
	</table>
	<div id="yzContent">
		
	</div>
</fieldset>
<br/><br/>
<fieldset id="sj" style="width: 640px" uri="shoper/branlist.jsp">
	<legend class="legend_bg2">商家注册监控</legend>
	<table cellpadding="0" cellspacing="0" width="640px" style="margin-top: 15px;">
	<tr>
		<td width="80px">会员名</td><td width="80px">品牌名称</td><td width="80px">店铺地址</td><td width="120px">联系电话</td><td width="80px">公司负责人</td><td style="border-right: 0px;">申请时间</td>
	</tr>
	</table>
	<div id="sjContent">
		
	</div>
</fieldset>
<br/><br/>
<fieldset id="qg" style="width: 400px" uri="tgBrandMember/pingqiangrecord.shtml">
	<legend class="legend_bg3">参加抢购监控</legend>
	<table cellpadding="0" cellspacing="0" width="400px" style="margin-top: 15px;">
	<tr>
		<td width="80px">姓名</td><td width="120px">手机</td><td style="border-right: 0px;">申请时间</td>
	</tr>
	</table>
	<div id="qgContent">
		
	</div>
</fieldset>
<br/><br/>
<fieldset id="pg" style="width: 800px" uri="buyrecord/pinggourecordlist.shtml">
	<legend class="legend_bg4">参加拼购监控</legend>
	<table cellpadding="0" cellspacing="0" width="800px" style="margin-top: 15px;">
	<tr>
		<td width="80px">姓名</td><td width="120px">手机</td><td width="200px">小区名称</td><td width="120px">拼购时间</td><td width="80px">购买数量</td><td style="border-right: 0px;">参加时间</td>
	</tr>
	</table>
	<div id="pgContent">
		
	</div>
</fieldset>
<br/><br/>
<fieldset id="sq" style="width: 360px" uri="pinppairecord/pinppairecord.jsp">
	<legend class="legend_bg5">拼购/抢购申请监控</legend>
	<table cellpadding="0" cellspacing="0" width="360px" style="margin-top: 15px;">
	<tr>
		<td width="80px">类型</td><td width="80px">申请名称</td><td width="80px">申请人</td><td width="120px" style="border-right: 0px;">联系方式</td>
	</tr>
	</table>
	<div id="sqContent">
		
	</div>
</fieldset>
<a id="openUrl" style="display: none;" href="#" target="_blank"></a>
</body>
<script type="text/javascript">
var tipTime = '<%=tipTime%>';
	function loadyz(){
		$.get('../tip/loadYz.shtml?tipTime='+tipTime+'&t='+(new Date().getTime()),function(mes){
			var jsonObj = eval('('+mes+')');
			if(jsonObj.length>0){
				var str = '<table cellpadding="0" cellspacing="0" width="740px">';
				for(var i = 0; i < jsonObj.length; i++){
					var obj = jsonObj[i];
					str += '<tr><td width="80px">'+obj['username']+'</td><td width="80px">'+obj['password']+'</td><td width="80px">'+obj['type']+'</td><td width="300px" style="text-align:left">'+obj['modulePassword']+'</td><td style="border-right: 0px;">'+obj['createDateFormat']+'</td></tr>'
				}		
				str += '</table>';
				$("#yzContent").html(str);
			}else{
				$("#yzContent").html('');
			}
		})
	}
	
	function loadsj(){
		$.get('../tip/loadSj.shtml?tipTime='+tipTime+'&t='+(new Date().getTime()),function(mes){
			var jsonObj = eval('('+mes+')');
			if(jsonObj.length>0){
				var str = '<table cellpadding="0" cellspacing="0" width="640px">';
				for(var i = 0; i < jsonObj.length; i++){
					var obj = jsonObj[i];
					str += '<tr><td width="80px">'+obj['username']+'</td><td width="80px">'+obj['password']+'</td><td width="80px">'+obj['modulePassword']+'</td><td width="120px">'+obj['type']+'</td><td width="80px">'+obj['source']+'</td><td style="border-right: 0px;">'+obj['createDateFormat']+'</td></tr>'
				}		
				str += '</table>';
				$("#sjContent").html(str);
			}else{
				$("#sjContent").html('');
			}
		})
		
	}
	function loadqg(){
		$.get('../tip/loadQg.shtml?tipTime='+tipTime+'&t='+(new Date().getTime()),function(mes){
			var jsonObj = eval('('+mes+')');
			if(jsonObj.length>0){
				var str = '<table cellpadding="0" cellspacing="0" width="400px">';
				for(var i = 0; i < jsonObj.length; i++){
					var obj = jsonObj[i];
					str += '<tr><td width="80px">'+obj["name"]+'</td><td width="120px">'+obj["tel"]+'</td><td style="border-right: 0px;">'+obj["joinDateString"]+'</td></tr>';
				}		
				str += '</table>';
				$("#qgContent").html(str);
			}else{
				$("#qgContent").html('');
			}
		})
	}
	function loadpg(){
		$.get('../tip/loadPg.shtml?tipTime='+tipTime+'&t='+(new Date().getTime()),function(mes){
			var jsonObj = eval('('+mes+')');
			if(jsonObj.length>0){
				var str = '<table cellpadding="0" cellspacing="0" width="800px">';
				for(var i = 0; i < jsonObj.length; i++){
					var obj = jsonObj[i];
					str += '<tr><td width="80px">'+obj["name"]+'</td><td width="120px">'+obj["pho"]+'</td><td width="200px">'+obj["address"]+'</td><td width="120px">'+obj["partTimeFormat"]+'</td><td width="80px">'+obj["buyNum"]+'</td><td style="border-right: 0px;">'+obj["createTimeString"]+'</td></tr>'
				}		
				str += '</table>';
				$("#pgContent").html(str);
			}else{
				$("#pgContent").html('');
			}
		})		
	}
	function loadsq(){
		$.get('../tip/loadSq.shtml?tipTime='+tipTime+'&t='+(new Date().getTime()),function(mes){
			var jsonObj = eval('('+mes+')');
			if(jsonObj.length>0){
				var str = '<table cellpadding="0" cellspacing="0" width="360px">';
				for(var i = 0; i < jsonObj.length; i++){
					var obj = jsonObj[i];
					str += '<tr><td width="80px">'+formatType(obj["type"])+'</td><td width="80px">'+obj["name"]+'</td><td width="80px">'+obj["user"]+'</td><td width="120px" style="border-right: 0px;">'+obj["tel"]+'</td></tr>'
				}		
				str += '</table>';
				$("#sqContent").html(str);
			}else{
				$("#sqContent").html('');
			}
		})		
	}

function formatType(value){
	if(value == "1") return "拼购申请";
	else return "拼抢申请";
}

$("fieldset").dblclick(function(){
	var openUrl = $("#openUrl")
	openUrl.attr("href", "../"+$(this).attr("uri"));
	amonitor('openUrl');
})

function tipOnTime(){
	loadyz();
	loadsj();
	loadqg();
	loadpg();
	loadsq();
	setTimeout("tipOnTime()",1000*60);
}
setTimeout("tipOnTime()",1000*10);

function amonitor(id) {
	var comment = document.getElementById(id);
	if (document.all) {
		// For IE
		comment.click();
	} else if (document.createEvent) {
		// FOR DOM2
		var ev = document.createEvent('MouseEvents');
		ev.initEvent('click', false, true);
		comment.dispatchEvent(ev);
	}
}
</script>
</html>